import static org.junit.Assert.assertEquals;

import org.junit.Test;


public class NetCommunicationTest {

	boolean serverON = false;
	String myIP = "192.168.1.6";

	@Test
	public void connectTest()
	{
		if (!serverON)
		{
			NetCommunicationWrapper test = new NetCommunicationWrapper();
			assertEquals(false, test.connect(myIP));
		}
		if (serverON)
		{
			NetCommunicationWrapper test = new NetCommunicationWrapper();
			assertEquals(true, test.connect(myIP));
		}
	}

	@Test
	public void checkConnectabilityTest()
	{
		if (!serverON)
		{
			assertEquals(false, NetCommunicationWrapper.checkConnectability(myIP));
		}
		if (serverON)
		{
			assertEquals(true, NetCommunicationWrapper.checkConnectability(myIP));
		}
	}
}